import Content from '@/sheep/layouts/content.vue';
import { request } from '@/sheep/request';
import { SELECT, RECYCLE_BIN, CRUD, RECYCLE } from '@/sheep/request/crud';

const route = {
  path: 'settings',
  name: 'supplychian.admin.settings',
  component: Content,
  meta: {
    title: '设置',
  },
  children: [
    {
      path: 'pricetemplate',
      name: 'supplychian.admin.settings.pricetemplate',
      component: () => import('./pricetemplate/index.vue'),
      meta: {
        title: '价格模板',
      },
    },
  ],
};

const api = {
  shop_priceTemp: (data) =>
    request({
      url: '/shop/yb/goods/channelgoods/priceTemp',
      method: 'POST',
      data,
    }),
  shop_editPriceTemp: (data) =>
    request({
      url: '/shop/yb/goods/channelgoods/editPriceTemp',
      method: 'POST',
      data,
    }),
  shop_delPriceTemp: (id) =>
    request({
      url: `/shop/yb/goods/channelgoods/delPriceTemp/${id}`,
      method: 'GET',
    }),
    service: {
        ...CRUD('shop/admin/goods/service'),
        select: (params) => SELECT('shop/admin/goods/service', params),
      },
};

export { route, api };
